<!DOCTYPE html>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Turnos</title>
		<link type="text/css" href="css/login.css" rel="stylesheet">
	</head>
	<body>
		<form:form method="POST" commandName="loginForm" action="/turnos/home.do" acceptCharset="utf-8">
			<table>
				<tr>
					<td><form:label path="email">Email:</form:label></td>
					<td><form:input path="email"/></td>
					<td><form:errors path="email" cssClass="error"/></td>
				</tr>
				<tr>
					<td><form:label path="password">Password:</form:label></td>
					<td><form:password path="password"/></td>
					<td><form:errors path="password" cssClass="error"/></td>
				</tr>
				<tr>
					<td colspan="2"><input type="submit" value="Sign In"/></td>
				</tr>
				<tr>
					<c:if test="${(not empty loginResponse) && (!loginResponse.success)}">
						<fieldset id="messages">
							<label>${loginResponse.errorMessage}</label>
						</fieldset>
					</c:if>
				</tr>
			</table>
		</form:form>
	</body>
</html>
